define(function(require, exports, module)
{
	var $ = require("$");
	require('bootstrap_commonrequire');

	var form_tpl = require("./systemdetail.tpl");
	var Widget = require("widget");
	var handlebars = require("handlebars");

	var modaldialog = Widget.extend(
	{
		handlebars : handlebars,
		template : form_tpl,
		// 初始化参数
		initCustAttr : function()
		{
		},
		afterRender : function()
		{
			$('#system_log_detail').modal('hide');
		}
	});

	exports.init = function(param)
	{
		new modaldialog(
		{
			attrs :
			{
				id : "system_log_detail",
				title : param.title,
				//details:param.details
			},
			renderTo : param.renderTo
		});
		$('#system_log_detail').modal('show');
		var result_detail = param.details.replace(/\</g,"[");
		result_detail = result_detail.replace(/\>/g,"]");
		result_detail = result_detail.replace(/\|/g,"<br>");
		$('#log_details')[0].innerHTML=result_detail;
	};
});
